
Page({
  data: {
    curriculums: [{
      id: 1,
      name: '语文',
      schoolTime: ['明天', '一至四节', '08:00-12:00']
    }, {
      id: 2,
      name: '数学',
      schoolTime: ['明天', '一至四节', '08:00-12:00']
    }],
    clockTest: '闹钟设置',
    buttonType: 'primary',
    buttonDisplay: 'block',
    pickerDisplay: 'none',
    time: "18:00",
  },
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示
  },
  onHide: function () {
    // 页面隐藏
  },
  onUnload: function () {
    // 页面关闭
  },
  selectTime: function (e) {
    var time = e.detail.value;
    this.setData({
      time: time
    })
  },
  changeSelect: function (e) {
    var id = e.currentTarget.id;
    if (id === 'open') {
      this.setData({
        buttonDisplay: 'none',
        pickerDisplay: 'block'
      });
    } else {
      this.setData({
        buttonDisplay: 'block',
        pickerDisplay: 'none'
      });
    }
  }
});
